﻿Imports System.Text
Imports System.Windows
Imports System.Windows.Controls
Imports System.Windows.Data
Imports System.Windows.Documents
Imports System.Windows.Input
Imports System.Windows.Media
Imports System.Windows.Media.Imaging
Imports System.Windows.Navigation
Imports System.Windows.Shapes

Namespace TwitterThisWidget
	''' <summary>
	''' Interaction logic for TwitterThisView.xaml
	''' </summary>
	Partial Public Class TwitterThisView
		Inherits UserControl
		Public Event Tweet As EventHandler

		Public Sub New()
			InitializeComponent()
		End Sub

		Protected Overrides Sub OnMouseUp(ByVal e As MouseButtonEventArgs)
			MyBase.OnMouseUp(e)
            OnTweet(New EventArgs)
			e.Handled = True
		End Sub

		Protected Overridable Sub OnTweet(ByVal e As EventArgs)
			RaiseEvent Tweet(Me, e)
		End Sub

		Private Sub Grid_MouseEnter(ByVal sender As Object, ByVal e As MouseEventArgs)
			Mouse.OverrideCursor = Cursors.Hand
		End Sub

		Private Sub Grid_MouseLeave(ByVal sender As Object, ByVal e As MouseEventArgs)
			Mouse.OverrideCursor = Nothing
		End Sub
	End Class
End Namespace